home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / standard / stio.z / stio
Encoding:
Text File  |  1998-10-30  |  5.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSTTTTIIIIOOOO((((3333XXXX))))                                                              SSSSTTTTIIIIOOOO((((3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      stio - routines that provide a binary read/write interface to the MIPS
  10.      symbol table
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyymmmmssss....hhhh>>>>
  14.  
  15.      lllloooonnnngggg sssstttt____rrrreeeeaaaaddddbbbbiiiinnnnaaaarrrryyyy((((cccchhhhaaaarrrr ****ffffiiiilllleeeennnnaaaammmmeeee,,,, cccchhhhaaaarrrr hhhhoooowwww))));;;;
  16.  
  17.      lllloooonnnngggg sssstttt____rrrreeeeaaaaddddsssstttt((((lllloooonnnngggg ffffnnnn,,,, cccchhhhaaaarrrr hhhhoooowwww,,,, lllloooonnnngggg ffffbbbbaaaasssseeee,,,, ppppCCCCHHHHDDDDRRRRRRRR ppppcccchhhhddddrrrr,,,, lllloooonnnngggg ffffllllaaaaggggssss))));;;;
  18.  
  19.      vvvvooooiiiidddd sssstttt____wwwwrrrriiiitttteeeebbbbiiiinnnnaaaarrrryyyy((((cccchhhhaaaarrrr ****ffffiiiilllleeeennnnaaaammmmeeee,,,, lllloooonnnngggg ffffllllaaaaggggssss))));;;;
  20.  
  21.      vvvvooooiiiidddd sssstttt____wwwwrrrriiiitttteeeesssstttt((((lllloooonnnngggg ffffnnnn,,,, lllloooonnnngggg ffffllllaaaaggggssss))));;;;
  22.  
  23. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.      The CHDRR structure (see <_c_m_p_l_r_s/_s_t_s_u_p_p_o_r_t._h> and the _s_t_c_u manual page)
  25.      represents a symbol table in memory.  A new CHDRR can be created by
  26.      reading a symbol table in from disk.  _S_t__r_e_a_d_b_i_n_a_r_y and _s_t__r_e_a_d_s_t read a
  27.      symbol table in from disk.
  28.  
  29.      _S_t__r_e_a_d_b_i_n_a_r_y takes the file name of the symbol table and assumes the
  30.      symbol table header (_H_D_R_R in <_s_y_m._h>) occurs at the beginning of the
  31.      file. _S_t__r_e_a_d_s_t assumes that its file number references a file positioned
  32.      at the beginning of the symbol table header and that the _f_b_a_s_e parameter
  33.      specifies where the object or symbol table file is based (for example,
  34.      non-zero for archives).
  35.  
  36.      The second parameter to the read routines can be `r' for read only or `a'
  37.      for appending to the symbol table. Existing local symbol, line,
  38.      procedure, auxiliary, optimization, and local string tables can not be
  39.      appended. If they didn't exist on disk, they can be created. This
  40.      restriction stems from the allocation algorithm for those symbol table
  41.      sections when read in from disk and follows the standard pattern for
  42.      building the symbol table.
  43.  
  44.      The symbol table can be read incrementally.  If _p_c_h_d_r is zero, _s_t__r_e_a_d_s_t
  45.      assumes that no symbol table has been read yet; therefore, it reads in
  46.      the symbol table header and file descriptors.  The _f_l_a_g_s argument is a
  47.      bit mask that defines what other tables should be read. _S_t__p* constants
  48.      for each table, defined in <_c_m_p_l_r_s/_s_t_s_u_p_p_o_r_t._h>, can be ORed.  If _f_l_a_g_s
  49.      equals `-1', all tables are read.  If _p_c_h_d_r is set, the tables specified
  50.      by _f_l_a_g_s are added to the tables that have already been read.  _P_c_h_d_r's
  51.      value can be gotten from _s_t__c_u_r_r_e_n_t__p_c_h_d_r.  See _s_t_c_u(3).
  52.  
  53.      Line number entries are encoded on disk, the read routines expand them to
  54.      longs.  See the _M_I_P_S _S_y_s_t_e_m _P_r_o_g_r_a_m_m_e_r _G_u_i_d_e.
  55.  
  56.      If the version stamp is out of date, a warning message is issued to
  57.      stderr.  If the magic number in the HDRR is incorrect, _s_t__e_r_r_o_r is
  58.      called.  All other errors cause the read routines to read non-zero;
  59.      otherwise, a zero is returned.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSTTTTIIIIOOOO((((3333XXXX))))                                                              SSSSTTTTIIIIOOOO((((3333XXXX))))
  71.  
  72.  
  73.  
  74.      _S_t__w_r_i_t_e_b_i_n_a_r_y and _s_t__w_r_i_t_e_s_t are symmetric to the read routines,
  75.      excluding the _h_o_w and _p_c_h_d_r parameters. The _f_l_a_g_s parameter is a bit mask
  76.      that defines what table should be written. _S_t__p* _c_o_n_s_t_a_n_t_s _f_o_r _e_a_c_h
  77.      _t_a_b_l_e, _d_e_f_i_n_e_d _i_n <_c_m_p_l_r_s/_s_t_s_u_p_p_o_r_t._h>, can be ORed. If _f_l_a_g_s equals `-
  78.      1', all tables are written.
  79.  
  80.      The write routines write sections of the table in the approved order, as
  81.      specified in the link editor (_l_d) specification.
  82.  
  83.      Line numbers are compressed on disk.  See the _M_I_P_S _S_y_s_t_e_m _P_r_o_g_r_a_m_m_e_r
  84.      _G_u_i_d_e.
  85.  
  86.      The write routines start all sections of the symbol table on four-byte
  87.      boundaries.
  88.  
  89.      If the write routines encounter an error, _s_t__e_r_r_o_r is called. After
  90.      writing the symbol table, further access to the table by other routines
  91.      is undefined.
  92.  
  93.      The programs must be loaded with the object file access routine library
  94.      libmld.a.
  95.  
  96. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  97.      stcu(3x), stfe(3x), stfd(3x)
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.